Skip to content

fix(agc): allow MSAA_ENABLE single-sample rect lists - #6563

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
notaxeltv:feat/agc-msaa-enable-rect-list
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
notaxeltv:feat/agc-msaa-enable-rect-list

Conversation

@notaxeltv

Copy link
Copy Markdown
Contributor

What

MSAA_ENABLE on a one-sample target already accepts filled triangles (VGT_PRIMITIVE_TYPE 4-6). Rect lists (7) and the alternate rectangle type (17) produce the same filled coverage, so they use that path instead of throwing. Points and lines still throw.

EA Sports UFC 5 (PPSA03541) stops on a rect-list draw with MSAA_ENABLE and MSAA_NUM_SAMPLES = 0 after COPY_DATA GDS.

Tested

Windows 10, WinLibs GCC 15.2.0. agc_driver_graphics passes. tools/check_conventions.py --base upstream/main passes. PPSA03541: retested with the rebuilt driver after this change.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none (stacks with fix(agc): COPY_DATA to and from GDS #6549 for PPSA03541)
  • Unblocks: PPSA03541 EA Sports UFC 5 (PPSA03541): null function pointer call in Engine.Render.Core2.PlatformPs5 about 20 s after start #3123
  • GPUs tested: n/a (state precheck only; existing single-sample MSAA_ENABLE execution coverage unchanged)
  • AI-assisted: yes

Made with Cursor

@notaxeltv

Copy link
Copy Markdown
Contributor Author

Verified on PPSA03541 stacked with #6549 (local GDS+MSAA AgcDriver): past COPY_DATA GDS and past MSAA_ENABLE rect-list. Title reaches HDR present and issues rect-list draws (Rect-list draw of shader ... preparing it at draw). Still running past both stops; no abort on the previous MSAA path.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7729 docs/dev/debt/libSceAgcDriver.md L24-25

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6146 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6457 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6479 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6612 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6636 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6730 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6762 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6887 docs/dev/debt/libSceAgcDriver.md
PR 6941 docs/dev/debt/libSceAgcDriver.md
PR 6946 docs/dev/debt/libSceAgcDriver.md
PR 6947 docs/dev/debt/libSceAgcDriver.md
PR 6958 docs/dev/debt/libSceAgcDriver.md
PR 6965 docs/dev/debt/libSceAgcDriver.md
PR 6966 docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6973 docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7008 docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7258 docs/dev/debt/libSceAgcDriver.md
PR 7310 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7390 docs/dev/debt/libSceAgcDriver.md
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 7650 docs/dev/debt/libSceAgcDriver.md
PR 7800 docs/dev/debt/libSceAgcDriver.md

@coltken95

Copy link
Copy Markdown

Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with f9f67e3 merged into main 31cbb55:

  • With the PR: all 8 tests built from Graphics.cpp pass.
  • With main's sources: agc_driver_graphics and agc_driver_alpha_to_coverage_state fail with AGC graphics: unexpected failure: MSAA_ENABLE on a single-sample target for primitives other than triangles is unsupported (register 0x242 = 0x00000002).

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 15, 2026
@notaxeltv
notaxeltv force-pushed the feat/agc-msaa-enable-rect-list branch from f9f67e3 to 70f9ed4 Compare October 15, 2026 23:13
@github-actions github-actions Bot added docs agc libSceAgc* and removed needs rebase Conflicts with main, rebase needed labels Oct 15, 2026
@notaxeltv
notaxeltv force-pushed the feat/agc-msaa-enable-rect-list branch from 70f9ed4 to 193963e Compare October 16, 2026 17:15
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 17, 2026
@blawesom

Copy link
Copy Markdown
Contributor

Rebase handoff — rebased onto current main cleanly (authorship unchanged).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV):

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/6563
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 04d023c07.

@klosixgaming-arch

Copy link
Copy Markdown
Contributor

Tested on PPSA03541 (EA SPORTS UFC 5, content version 01.031.000): Windows 11, RTX 5090, NVIDIA 617.42, WinLibs GCC 15.2.0. After #6549, the title stopped here with "MSAA_ENABLE on a single-sample target for primitives other than triangles is unsupported (register 0x242 = 0x00000007)" about 20 s in. This PR cannot be applied to main as it is: main has been refactored, and nonTriangleRejection(queue, message, rectangles = false) in State.cpp now takes the rectangle case, which singleSampleDepthScanRejection already passes as true. I made the equivalent change on main 66702f1 (singleSampleMsaaRejection returns nonTriangleRejection(queue, "MSAA_ENABLE on a single-sample target for primitives other than triangles and rectangles", true)) and the title got past this stop. The branch here has conflicts that need that rebase. With #6549 and #6572 the title reaches the logos and main menu at about 34 fps; full results are in #7239.

AI-assisted: yes. Written with AI assistance and reviewed by me.

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
Filled rectangles (VGT_PRIMITIVE_TYPE 7 and 17) use the same single-sample MSAA_ENABLE path as triangles; PPSA03541 stops on a rect-list draw otherwise.

Co-authored-by: Cursor <cursoragent@cursor.com>
@adriadam10
adriadam10 force-pushed the feat/agc-msaa-enable-rect-list branch from 193963e to 92f11a9 Compare October 19, 2026 07:45
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@adriadam10
adriadam10 merged commit f161098 into boykopovar:main Oct 19, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Main moved again (State.cpp was refactored around nonTriangleRejection), so this conflicted. I rebased onto current main and re-applied the change: singleSampleMsaaRejection now calls nonTriangleRejection(..., true), accepting VGT_PRIMITIVE_TYPE 7 and 17 like singleSampleDepthScanRejection. Points and lines still throw.

Added as our own commit on your branch:

  • Graphics.cpp test: 2 and 3 are refused with "...other than triangles and rectangles"; 5, 6, 7, 17 and 21 are accepted.
  • docs/dev/debt/libSceAgcDriver.md: the MSAA_ENABLE line now says filled triangles or rectangles are drawn and no longer lists rectangles among the throws.

Merging once the Build run is green. Thanks to @coltken95, @blawesom and @klosixgaming-arch for the runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants